Skip to content

fix(@angular-devkit/build-angular): build optimizer support for spec-compliant downlevel class properties#24658

Merged
angular-robot[bot] merged 1 commit intoangular:mainfrom
clydin:build-optimizer/native-static
Feb 7, 2023
Merged

fix(@angular-devkit/build-angular): build optimizer support for spec-compliant downlevel class properties#24658
angular-robot[bot] merged 1 commit intoangular:mainfrom
clydin:build-optimizer/native-static

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Feb 3, 2023

The build optimizer's static class field pass will now additionally wrap classes that contain side effect free class properties. This allows optimizers and bundlers further along in the build pipeline to downlevel that class properties while still retaining the ability to tree-shake the class if unused. The class properties may need to be downleveled for a variety of reasons such as lack of browser support, browser bugs with certain code structures, or to ensure spec-compliant runtime behavior.

Fixes: #24656

@clydin clydin added the target: patch This PR is targeted for the next patch release label Feb 3, 2023
@clydin clydin force-pushed the build-optimizer/native-static branch 3 times, most recently from b8b241d to 35b096c Compare February 6, 2023 15:23
…compliant downlevel class properties

The build optimizer's static class field pass will now additionally wrap
classes that contain side effect free class properties. This allows optimizers and
bundlers further along in the build pipeline to downlevel that class properties while
still retaining the ability to tree-shake the class if unused. The class properties
may need to be downleveled for a variety of reasons such as lack of browser support,
browser bugs with certain code structures, or to ensure spec-compliant runtime behavior.
@clydin clydin force-pushed the build-optimizer/native-static branch from 35b096c to 4dfc70a Compare February 6, 2023 15:35
@clydin clydin marked this pull request as ready for review February 6, 2023 15:46
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Feb 6, 2023
@clydin clydin requested a review from alan-agius4 February 6, 2023 15:48
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 7, 2023
@angular-robot angular-robot bot merged commit bfc0fac into angular:main Feb 7, 2023
@clydin clydin deleted the build-optimizer/native-static branch February 7, 2023 19:30
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular CLI V15 + TS Target ES2022 - No longer tree shaking unused services correctly

2 participants